﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SM_RoleEmployee.aspx.cs" Inherits="ZLDC.Estate.TM.SM_RoleEmployee"
    Theme="NewSkin" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="../UserControl/Autocomplete.ascx" TagName="Autocomplete" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>选择用户</title>
    <link href="../../cssnew/page.css" rel="stylesheet" type="text/css" />
    <style>
        .mainField
        {
            margin: 10px 6px 5px 10px;
            border: 0px solid #eee;
            clear: both;
            text-align: left;
        }
        a
        {
            color: blue;
            text-decoration: none;
        }
        a:hover
        {
            color: blue;
            text-decoration: underline;
        }
        a:visited
        {
            color: blue;
            text-decoration: none;
        }
    </style>

    <script language="javascript"> 
    <!--
    
    //打开模式对话框,strUrl为打开的带路径的URL,InValue为要传入的值

    function OpenModelessDialog(strUrl, InValue, strWidth, strHeight, sFeatures)
    { 
        var strFeatures;
        if(typeof(sFeatures)=="undefined")    
            strFeatures = "dialogWidth="+strWidth+"px;dialogHeight="+strHeight
                +"px;resizable:no;scrollbars:yes;center:yes;help:no;status:no";
        else
            strFeatures = "dialogWidth="+strWidth+"px;dialogHeight="+strHeight+"px;"+sFeatures;
        strUrl=strUrl+"?RoleID="+document.getElementById("txtRoleID").value;
        var sValue = showModalDialog(strUrl, InValue, strFeatures);
        //alert(sValue);
        if(sValue=="1")
            document.getElementById("btnSearch").click();
        return  sValue;
    }
   --> 
    </script>

    <base target="_self" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="hbNav">
        <div id="navLeft">
            <img src="../../images/zlTitle.gif" width="13" align="absmiddle" />&nbsp;&nbsp;当前功能<span
                class="hbdot">&raquo;</span>选择用户</div>
        <div id="navRght">
        </div>
    </div>
    <fieldset class="mainField">
        <div id="dvTable">
            <table border="0" cellpadding="1" cellspacing="1" width="98%">
                <tr>
                    <td nowrap="nowrap" style="background-color: #efefef" width="20%" align="right">
                        姓名：

                    </td>
                    <td class="searchTxt" width="30%">
                        &nbsp;<uc1:Autocomplete ID="Autocomplete5" runat="server" selectType="User" Style="width: 70%"
                            IsScript="true" />
                    </td>
                    <td nowrap="nowrap" style="background-color: #efefef" width="20%" align="right">
                        工号：

                    </td>
                    <td class="searchTxt" width="30%">
                        &nbsp;<input type="text" id="txtEmployeeNo" class="textdocdown" runat="server" style="width: 70%;" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <div id="dvBtn">
                            <asp:Button ID="btnSearch" runat="server" Text="查询" class="button_bak" OnClick="btnSearch_Click" />
                            &nbsp;<input type="button" id="btnSelectUsr" value="添加用户" class="button_bak" onclick="OpenModelessDialog('SM_SelectEmployee.aspx','Employee',730,600);" />
                            <input type="button" id="btnClsoe" value="关闭" class="button_bak" onclick="javascript:window.close();" />
                            <input type="hidden" id="txtRoleID" runat="server" />
                        </div>
                    </td>
                </tr>
            </table>
            <table border="1" cellpadding="0" cellspacing="0" class="datagrid-style" style="width: 100%">
                <tr class="datagrid-headerstyle">
                    <td class="datagrid-headercolor" align="center">
                        <b>NO.</b>
                    </td>
                    <td class="datagrid-headercolor" align="center">
                        <b>工号</b>
                    </td>
                    <td class="datagrid-headercolor" align="center">
                        <b>姓名</b>
                    </td>
                    <td class="datagrid-headercolor" align="center">
                        <b>性别</b>
                    </td>
                    <td class="datagrid-headercolor" align="center">
                        <b>部门名称</b>
                    </td>
                    <td class="datagrid-headercolor">
                    </td>
                </tr>
                <asp:DataList ID="dlistData" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal"
                    DataKeyField="序号" OnItemCommand="dlistData_ItemCommand" OnItemDataBound="dlistData_ItemDataBound">
                    <ItemTemplate>
                        <tr id="trList" runat="server">
                            <td class="datagrid-style" style="width: 30px;" align="center">
                                <%# Eval("Row")%>
                            </td>
                            <td class="datagrid-style" style="width: 60px;" align="center">
                                <%# Eval("工号")%>
                            </td>
                            <td class="datagrid-style" style="width: 150px;">
                                <%# Eval("姓名")%>
                            </td>
                            <td class="datagrid-style" style="width: 150px;">
                                <%# Eval("性别")%>
                            </td>
                            <td class="datagrid-style">
                                <%# Eval("部门名称")%>
                            </td>
                            <td class="datagrid-style" style="width: 50px;" align="center">
                                <asp:LinkButton ID="btnDelete" CommandName="delete" runat="server" Text="移除" CommandArgument='<%#Eval("序号")%>'></asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:DataList></table>
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" SubmitButtonText="跳转"
                Width="100%" ShowPageIndexBox="Always" HorizontalAlign="Right" AlwaysShow="True"
                OnPageChanging="AspNetPager1_PageChanging" PageIndexBoxClass="pageTextBox" SubmitButtonClass="ibutton"
                SubmitButtonStyle="" CustomInfoTextAlign="Left" LayoutType="Table" ShowCustomInfoSection="Left"
                PageSize="15" FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PrevPageText="上一页">
            </webdiyer:AspNetPager>
        </div>
    </fieldset>
    </form>
</body>
</html>
